package com.jelica.videoteka.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.SessionState;

import com.jelica.videoteka.interfaces.PomocniKorisnikI;

public class PregledGreske {

	@Persist
	private String passedMessage;

	public String getPassedMessage() {
		return passedMessage;
	}

	public void setPassedMessage(String passedMessage) {
		this.passedMessage = passedMessage;
	}

	public String getErrorMessage() {
		return this.passedMessage;
	}

	@SessionState
	private PomocniKorisnikI pomocniKorisnik;

	private boolean pomocniKorisnikExists;
	
	public PomocniKorisnikI getpPomocniKorisnikI() {
		return pomocniKorisnik;
	}
	
	Object onActivate() {
		if (!pomocniKorisnikExists) return Login.class;
		return null;
	}
	void onActivate(String message) {
		this.passedMessage = message;
	}

	
	String onPassivate() {
		return passedMessage;
	}
}
